const historyList = 'hematoutiao-84-hxj-history'
export const setHistory = (data) => {
  localStorage.setItem(historyList, JSON.stringify(data))
}
export const getHistory = () => {
  return JSON.parse(localStorage.getItem(historyList))
}

// 存储tokenInfo
const tokenInfo = 'tokenInfo'
export const setToken = (data) => {
  localStorage.setItem(tokenInfo, JSON.stringify(data))
}
export const getToken = () => {
  return JSON.parse(localStorage.getItem(tokenInfo)) || {}
}

export const removeToken = () => {
  console.log('token移出了')
  localStorage.removeItem(tokenInfo)
}
